From 56d6b7ac5dedb2413b22713e3760a617a3d5e260 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 15 Jun 2010 13:27:14 +0100 Subject: [PATCH] python/xc: fix out of bounds array access Writing a NUL terminator here isn't even necessary, since snprintf() already guarantees proper termination. Signed-off-by: Jan Beulich --- tools/python/xen/lowlevel/xc/xc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index 7330191ebd..a7286c4e85 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -58,7 +58,6 @@ static PyObject *pyxc_error_to_exception(xc_interface *xch) snprintf(err_buf.message, sizeof(err_buf.message), "xc_interface_open failed: %s", strerror(errno)); - err_buf.message[sizeof(err_buf)-1] = 0; err_buf.code = XC_INTERNAL_ERROR; err = &err_buf; } -- 2.30.2